/**
 * Created by zby on 2018/4/8.
 */
public class PC {
    CPU cpu = new CPU();
    HardDisk HD = new HardDisk();

    public void setCpu(CPU c) {
        cpu = c;
    }

    public void setHardDisk(HardDisk h) {
        HD = h;
    }

    public void show() {
        System.out.println("CPU的速度为：" + cpu.speed);
        System.out.println("硬盘的容量为：" + HD.amount);
    }

    PC() {
    }

    PC(CPU cpu) {
    }

    PC(HardDisk HD) {
    }

    PC(CPU cpu, HardDisk HD) {
    }
}
